#include"customer.h"
#include"c3pom/portalmanager.h"
#include<unistd.h>
#include<iostream>
using namespace std;
using namespace c3pom;
int customer::load()
{
	portal=PortalManager::getInstance()->regPortal("customer.test","queue","customer","std::string");
}

int customer::run(vector<string> args)
{

	while(portal!=NULL)
	{
		PortalBlock* pb;
		(*portal)>>pb;
		if(pb!=NULL)
		{
			cout<<pb->getData().castto<string>()<<endl;
		}
		sleep(1);
	}
}

int customer::stop(vector<string> args)
{
}
